Skip to content

Add allowWatchBookmarks and resourceVersionMatch support to GenericKubernetesApi list/watch - #4892

Closed
brendandburns with Copilot wants to merge 8 commits into
masterfrom
copilot/analyze-capability-gaps
Closed

Add allowWatchBookmarks and resourceVersionMatch support to GenericKubernetesApi list/watch#4892
brendandburns with Copilot wants to merge 8 commits into
masterfrom
copilot/analyze-capability-gaps

Conversation

Copilot AI commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

This change closes a concrete parity gap with client-go in the Java dynamic/generic client path: list/watch calls could not express allowWatchBookmarks and resourceVersionMatch. As a result, consumers could not request bookmark events or control resourceVersion matching semantics through ListOptions.

  • API surface: ListOptions parity

    • Added allowWatchBookmarks and resourceVersionMatch fields to ListOptions
    • Added fluent setters/getters to match existing option patterns
  • Request wiring: GenericKubernetesApi

    • Propagated both options into cluster-scoped and namespaced list builders
    • Propagated both options into cluster-scoped and namespaced watch builders
    • Applies to custom resource flows backed by CustomObjectsApi
  • Coverage updates

    • Extended unit tests in GenericKubernetesApiTest to assert query parameter propagation for list and watch
    • Added e2e coverage in DynamicApiTest using DynamicKubernetesApi with real list filtering + resourceVersion semantics
ListOptions opts = new ListOptions()
    .fieldSelector("metadata.name=my-ns")
    .resourceVersion(rv)
    .resourceVersionMatch("NotOlderThan")
    .allowWatchBookmarks(true);

dynamicApi.list(opts);
dynamicApi.watch(opts);

Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
@kubernetes-prow kubernetes-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 1, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 1, 2026

Copy link
Copy Markdown

CLA Not Signed

@kubernetes-prow kubernetes-prow Bot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 1, 2026
Copilot AI changed the title Add GenericKubernetesApi support for allowWatchBookmarks and resourceVersionMatch Add allowWatchBookmarks and resourceVersionMatch support to GenericKubernetesApi list/watch Sep 1, 2026
@kubernetes-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, Copilot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@brendandburns
brendandburns marked this pull request as ready for review September 1, 2026 16:15
@kubernetes-prow kubernetes-prow Bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Sep 1, 2026
Copilot AI and others added 2 commits September 1, 2026 16:22
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
@kubernetes-prow kubernetes-prow Bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 1, 2026
Copilot AI and others added 4 commits September 1, 2026 16:28
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Co-authored-by: brendandburns <5751682+brendandburns@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants